#!C:\Python26
# -*- coding: UTF-8 -*-
import sys
if len(sys.argv) > 1:
	if sys.argv.find("graph")+1:
		try:
			import pycallgraph
			pycallgraph.start_trace()
			pass
		except:
			print "Callgraph Failed"
			pass

import GUIInit						#GUI Handling
import webGetThread
import threading

import logmanager


import queVars
queVars.configuration = queVars.ConfigValues()

logmanager.initLogging()

queVars.webThread = threading.Thread(target = webGetThread.mainLoop, name = "PluginMain")
#queVars.webThread.daemon = True
queVars.webThread.start()

global app


def appMain():
	global app
	app = GUIInit.MyApp(0)
	app.MainLoop()


if __name__ == "__main__":
	print "running as __main___"
	app = GUIInit.MyApp(0)
	app.MainLoop()


	